package com.aimee.dao;

import java.sql.Connection;
import java.sql.SQLException;

import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanHandler;
import org.apache.commons.dbutils.handlers.ScalarHandler;

import com.aimee.entity.User;
import com.aimee.util.Dbutil;

public class RoleDAO {
  public String rolePages(int role_id) throws SQLException {
	String sql="SELECT role_page_ids FROM ROLE WHERE role_id=?";
	Connection conn = Dbutil.getConn();
	QueryRunner runner = new QueryRunner();
	String ids= runner.query(conn, sql, role_id,new ScalarHandler<String>()); 
	conn.close();
	return ids;
	  
  }
}
